package com.guigu.yh.springcloud.controller;

import cn.hutool.core.lang.UUID;
import com.guigu.yh.springcloud.common.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 付款控制器
 * 本实例以 consul为注册中心
 *
 * @author 张颖辉（zyh）
 * @version 1.0.0
 * @date 2022/08/19
 */
@Slf4j
@RestController
public class PaymentController {

    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/payment/consul")
    public JsonResult paymentConsul() {
        log.info("PaymentController.consul");
        return new JsonResult("200", "springcloud with consul, serverPort:" + serverPort + "\t" + UUID.randomUUID(), null);
    }
}
